﻿#region Styx Namespaces
using Styx;
using Styx.Common;
using Styx.CommonBot;
using Styx.CommonBot.Routines;
#endregion

namespace GiwinMonk
{
    public partial class Monk : CombatRoutine
    {
        public bool Buff(string SpellName)
        {
                if (SpellManager.CanCast(SpellName) &&
                    !SpellManager.Spells[SpellName].Cooldown &&
                    !StyxWoW.Me.IsCasting && !StyxWoW.Me.IsChanneling &&
                    !IsCCd())
                    StyxWoW.Me.ClearTarget();
                    StyxWoW.SleepForLagDuration();
                    SpellManager.Cast(SpellName);
            Logging.Write("Buff: " + SpellName +
                " (Energy: " + StyxWoW.Me.CurrentEnergy +
                ", Chi: " + StyxWoW.Me.CurrentChi.ToString() + ")");
            return true;
        }
    }
}
